package com.onpositive.notes.argumnets;

import com.onpositive.notes.label.providers.BasicLabelProvider;
import com.onpositive.notes.model.ITemplateModel;

public class IntegerArgumnetModel extends BasicArgumentModel<Integer, IntegerArgument> {

	public IntegerArgumnetModel() {
		super();
	}

	private static final long serialVersionUID = -107646759533497196L;

	public IntegerArgumnetModel(String name, boolean isRequired) {
		super(Integer.class, name, new BasicLabelProvider<Integer>(Integer.class), isRequired);
	}

	@Override
	public IntegerArgument createInstance(Integer value, ITemplateModel<?> templateModel) {
		IntegerArgument arg = new IntegerArgument(value, this, isRequired) ;
		arg.setTemplateModelId( templateModel.getId() ) ;
		return arg;
	}

}
